import { createRouter, createWebHistory } from "vue-router";

import Film from "../views/Film.vue";
import FilmList from "../views/FilmList.vue";

const router = createRouter({
  history: createWebHistory(),
  routes: [
    {
      path: "/films",
      component: FilmList,
    },
    {
      path: "/film/:filmId",
      name: "film",
      component: Film,
    },
  ],
});

export default router;
